Static Analysis, Abstract Interpretation and Verification in (Constraint Logic) Programming
نویسندگان
چکیده
values in A. This justifies the choice of the backward and forward terminology above. We denote by, respectively, F(C, f) and B(C, f) the set of Fand Bcomplete abstractions of C for f . It is worth noting that in general F(C, f) 6⊆ B(C, f) and F(C, f) 6⊆ B(C, f), namely Band F-completeness are incomparable notions. Example 1. Let Sign be the simple abstraction of 〈℘(Z),⊆〉 for analysing integer variables depicted in Fig. 1. Consider the pointwise square operation sq : ℘(Z)→ ℘(Z) defined as follows: sq(X) , {x | x ∈ X }. Let ρ ∈ uco(℘(Z)) be the closure operator associated with Sign, i.e. ρ = γSign+ ◦ αSign+ , where the abstraction and concretization maps are the obvious ones. The best correct approximation of sq in Sign is sq : Sign → Sign defined as sq(X) , ρ(sq(X)), with X ∈ Sign. It is easy to note that the closure operators ρa , {Z, [0,+∞], [0, 10]} and ρb , {Z, [0, 2], [0]}, defined by their images — the images of ρa and ρb are depicted as bullets in Fig. 1 — are such that: – ρa ∈ F(Sign, sq) but ρa 6∈ B(Sign, sq): for example, ρa(sq(ρa([0]))) = [0,+∞] while ρa(sq([0])) = [0, 10]; – ρb ∈ B(Sign, sq) but ρb 6∈ F(Sign, sq): for example, ρb(sq(ρb([0, 2]))) = Z while sq(ρb([0, 2])) = [0, 10]. u t One key result in [44] provides a constructive characterization of the structure of abstract domains that are B-complete for continuous functions. Given a function f : C → C and S ⊆ C, f−1(S) denotes the inverse image of f in S, i.e., {x ∈ C | f(x) ∈ S }. Then, [44] shows that ρ ∈ uco(C) is B-complete for f ⇔ ⋃ y∈ρ(C) max(f−1(↓y)) ⊆ ρ(C) (∗) Let us consider Example 1. It is easy to see that ρa is not B-complete because ρa does not include the maximal inverse image of sq of the subset ↓ [0, 10], namely max(sq](↓ [0, 10])) = {[0, 2]}. An analogous (and trivial to prove) result can be stated for F-completeness. In this case, F-complete domains can be characterized for merely monotone operations as
منابع مشابه
Refining Abstract Interpretation Based Value Analysis with Constraint Programming Techniques
Abstract interpretation based value analysis is a classical approach for verifying programs with floating-point computations. However, state-of-the-art tools compute an over-approximation of the variable values that can be very coarse. In this paper, we show that constraint solvers can significantly refine the approximations computed with abstract interpretation tools. We introduce a hybrid app...
متن کاملTowards Verification of Java Bytecode using Logic Programming Tools
State of the art analyzers in the (Constraint) Logic Programming paradigm (or (C)LP for short) are nowadays mature and sophisticated. They allow inferring a wide variety of global properties including termination, run-time error freeness, bounds on resource consumption, etc. The aim of this work is to automatically transfer the power of such analysis tools for LP to the analysis and verificatio...
متن کاملAutomatic Inference of Access Permissions
Access permissions are used in several program verification approaches such as those based on separation logic or implicit dynamic frames to simplify framing and to provide a basis for reasoning about concurrent code. However, access permissions increase the annotation overhead because programmers need to specify for each program component which permissions it requires or provides. We present a...
متن کاملVeriPolyTypes: a tool for Verification of Logic Programs w.r.t. Type Specifications
In this system demonstration we present a tool for the verification of Logic Programs w.r.t. type information specifications. The tool is based on sufficient verification conditions obtained by abstract interpretation. Following the theoretical foundation in [2,4,3], the tool is obtained by transforming a static analyzer on a type domain for Logic Programs designed by Codish and Lagoon [1].
متن کاملFlow Logic: A Multi-paradigmatic Approach to Static Analysis
Flow logic is an approach to static analysis that separates the specification of when an analysis estimate is acceptable for a program from the actual computation of the analysis information. It allows one not only to combine a variety of programming paradigms but also to link up with state-of-the-art developments in classical approaches to static analysis, in particular data flow analysis, con...
متن کاملAn Abstract Interpretation Based Combinator for Modelling While Loops in Constraint Programming
We present the w constraint combinator that models while loops in Constraint Programming. Embedded in a finite domain constraint solver, it allows programmers to develop non-trivial arithmetical relations using loops, exactly as in an imperative language style. The deduction capabilities of this combinator come from abstract interpretation over the polyhedra abstract domain. This combinator has...
متن کامل